home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / linkedit / linkedit.lha / link-edit / LinkEdit / Choose / readme < prev    next >
Encoding:
Text File  |  1991-03-13  |  2.7 KB  |  78 lines

  1. The files in this directory are for a Mac. like file chooser.
  2.  
  3. It contains the file chooser in two versions. The first is a command line version, which
  4. can be executed from unix with a variety of options. The second is a C procedure version,
  5. which can be linked to ones own program. 
  6.  
  7.  
  8. To Make the versions, type "make sun" if you are using a sun and likewise type "make 
  9. iris" if you are using an iris. This will make two programs: command and choose. 
  10. Choose is a compiled version of the sample.c program and is an example of using the
  11. file chooser in the procedural form. Command is the command line version. By just
  12. typing "command" at the unix prompt, the file chooser will start with default settings.
  13.  
  14.  
  15. Command line options:
  16.  
  17. -w
  18. -write
  19.    Use the write mode of the file chooser. Note that one can choose only one file at a
  20.    time, since one would only want to save something to one file.
  21.  
  22. -r
  23. -read
  24.    Use the read mode of the file chooser. Now one can select several files to read from.
  25.    Note that this is the default setting, so using this option is redundant.
  26.  
  27. -d 
  28. -dir
  29.    This selects the directory to start the chooser in. One would type "-dir /usr/games"
  30.    to start the file chooser in the /usr/games directory. Note that the default is
  31.    "-dir .". 
  32.  
  33. -n
  34. -names
  35.    This selects the initial names that would start highlighted. For example if one
  36.    typed "-names 2 tetris backgammon" the chooser will start up with tetris and
  37.    backgammon highlighted. It is possible to use wildcards in this system. Just type
  38.    ''-names 2 "*.c" "*.o" `` to select all the .c and .o files. ( the "" are
  39.     intentional)
  40.  
  41. -s
  42. -suffix
  43.    This limits ones selections to the files that match the suffixs. For example, if
  44.    one typed ''-suffix 2 "*.c" "*.o" ``, only the .c and .o files will be displayed at
  45.    all. This is different from the -names option in that -suffix option chooses the
  46.    files to be displayed in the window, the -name option chooses which ones will be
  47.    initially highlighted.
  48.  
  49. Procedure calling:
  50.  
  51. choosefile(&namesc,&namesv,&enddir,startdir,writeorread);
  52.  
  53. Where the variables are defined by:
  54.  
  55.   char **namesv;
  56.   char *enddir;
  57.   char *startdir;
  58.   int namesc;
  59.   int writeorread;
  60.  
  61. To start the chooser in write mode, writeorread should be set to 1. Otherwise, one
  62. should set writeorread to 0 to start in read mode.
  63.  
  64. One only needs this call to access the program. It even mallocates the memory for
  65. "**namesv".
  66.  
  67. If one wants to free the memory that the program allocate for "**namesv", one should
  68. call:
  69.    chfree(&namesc,&namesv);
  70.  
  71. ----------------------
  72. The suffix commands are 
  73. suflist(name)  (does name agree with suffixes)
  74. delsuff(name)  (delete name from suffixes)
  75. addsuff(name)  (add name to suffixes)
  76. clearsuff()    (clear suffixes)
  77.  
  78.